/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.raflik.queryxml.saxon.xpath;

import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathFactoryConfigurationException;
import net.sf.saxon.xpath.XPathEvaluator;

/**
 *
 * @author raflik
 */
public class SaxonXPath2Resolver extends AbstractSaxonXPathResolver {

    private static final String LANG_XPATH2 = "XPath 2.0 (Saxon)";
    private static final String MIME_TYPE = "text/x-xpath2";

    @Override
    protected XPath instantiateXPath() throws XPathFactoryConfigurationException {
        XPathEvaluator evaluator = new XPathEvaluator();

        evaluator.setBackwardsCompatible(false);
        return evaluator;

    }

    public String supportedLanguage() {
        return LANG_XPATH2;
    }

    public String mimeType() {
        return MIME_TYPE;
    }
}
